<h1>Pick a Shipping Method</h1>

<div class='clearfix'>
  <%= form_tag(shopping_shipping_method_path(session_order.id), html: {class: 'custom'}, method: :put) do -%>

      <% @order_items.group_by(&:shipping_category_id).each do |shipping_category_id, items| %>
        <ul class='vertical menu'>
          <% items.each do |item| %>
            <li class=' large-10 clearfix panel callout'>
              <div class=' large-6 columns'>
                <%= image_tag(item.variant.product.featured_image(:small)) %>
                <%= item.variant.product.name %> Quantity: <%= item.quantity %>
              </div>
              <div class=' large-4 columns last' style='text-align:left;'>
                <%= raw item.variant.display_property_details %>
              </div>
            </li>
          <% end %>
        </ul>
        <ul class=' large-10 callout secondary'>
        <% items.first.shipping_rate_options(session_order.sub_total).each do |rate| %>
          <li><%= radio_button_tag "shipping_category[#{shipping_category_id}]", rate.id %> <%= rate.name_rate_min %></li>
        <% end %>
        </ul>

      <% end %>

    <div class=' large-10 clearfix offset-by-two'>
      <%= submit_tag 'continue', :class => 'button' %>
    </div>

  <% end %>
</div>
